<template>
  <div class="monkeyHouse">
    <h1>猴窝</h1>
  </div>
</template>

<script>
import eventBus from "../eventBus/index.js";

export default {
  name: "",
  data() {
    return {};
  },
  // 钩子函数：组件创建时被自动调用
  created() {
    // 向 事件中心 注册 事件属性
    eventBus.$on("onShowFood", this.getFood);
  },
  methods: {
    getFood(food) {
      console.log("感谢老铁的投喂：", food);
    },
  },
  computed: {},
  watch: {},
  components: {},
};
</script>

<style lang="less" scoped>
</style>
